-module(gettickcount).
-compile(export_all).

sleep(N) -> receive after N -> ok end.

main() ->
    {ok, Lib} = ffi:load_library_win("kernel32"),
    io:format("GetTickCount()=~w~n", [ffi:call(Lib, "GetTickCount", [])]),
    sleep(300),
    io:format("GetTickCount()=~w~n", [ffi:call(Lib, "GetTickCount", [])]),
    %%sleep(300),
    %%io:format("GetTickCount(25)=~w~n", [ffi:call(Lib, "GetTickCount", [25])]),
    erlang:halt().
